package com.galaxy.commom.base.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 幂等注解
 * @author caijinbang
 * @date 2018/10/12 13:43
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Documented
public @interface Idempotent {

  /**
   * 幂等key的分组值,例如sale-check
   * @return
   */
  String value();

  /**
   * 参数表达式,用来确定key值,例如:"#req.saleInfo.channelCode+'-'+#req.seqId"
   * @return
   */
  String express();
}
